package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * IrrigationsTypes generated by hbm2java
 */
@Entity
@Table(name="irrigations_types"
    ,catalog="madr_bd10"
)
public class IrrigationsTypes  implements java.io.Serializable {


     private Integer idIrrTyp;
     private String nameIrrTyp;
     private boolean statusIrrTyp;
     private Set irrigations = new HashSet(0);
     private Set cropsTypeses = new HashSet(0);

    public IrrigationsTypes() {
    }

	
    public IrrigationsTypes(String nameIrrTyp, boolean statusIrrTyp) {
        this.nameIrrTyp = nameIrrTyp;
        this.statusIrrTyp = statusIrrTyp;
    }
    public IrrigationsTypes(String nameIrrTyp, boolean statusIrrTyp, Set irrigations, Set cropsTypeses) {
       this.nameIrrTyp = nameIrrTyp;
       this.statusIrrTyp = statusIrrTyp;
       this.irrigations = irrigations;
       this.cropsTypeses = cropsTypeses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_irr_typ", unique=true, nullable=false)
    public Integer getIdIrrTyp() {
        return this.idIrrTyp;
    }
    
    public void setIdIrrTyp(Integer idIrrTyp) {
        this.idIrrTyp = idIrrTyp;
    }
    
    @Column(name="name_irr_typ", nullable=false, length=45)
    public String getNameIrrTyp() {
        return this.nameIrrTyp;
    }
    
    public void setNameIrrTyp(String nameIrrTyp) {
        this.nameIrrTyp = nameIrrTyp;
    }
    
    @Column(name="status_irr_typ", nullable=false)
    public boolean isStatusIrrTyp() {
        return this.statusIrrTyp;
    }
    
    public void setStatusIrrTyp(boolean statusIrrTyp) {
        this.statusIrrTyp = statusIrrTyp;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="irrigationsTypes")
    public Set getIrrigations() {
        return this.irrigations;
    }
    
    public void setIrrigations(Set irrigations) {
        this.irrigations = irrigations;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="irrigations_types_crops_types", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_irrigation_type_irr_typ_cro", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_crop_type_irr_typ_cro", nullable=false, updatable=false) })
    public Set getCropsTypeses() {
        return this.cropsTypeses;
    }
    
    public void setCropsTypeses(Set cropsTypeses) {
        this.cropsTypeses = cropsTypeses;
    }




}


